@extends('Admin.layout.layout')
@section('title','价格主页')
@section('url','/admin/price')
@section('home','价格管理')
@section('weizhi','价格主页')
@section('con')

<div class="row">
    <div class="col-lg-12">
        <section class="panel">
            <header class="panel-heading" style="display:block;position:relative;">
               <font style="display:block;position:absolute;float:left"><font>价格信息</font></font>
                <div class="nav search-row" id="top_menu" style="position: absolute;float: left;margin-left: 100px;margin-top: 6px;">
                    <!--  search form start -->
                    <ul class="nav top-menu">                    
                        <li style="border:0px">
                            <form class="navbar-form" method="get" action="{{url('/admin/price/index')}}">
                                <input class="form-control" placeholder="Search" name="keywords" value="{{$data['keywords'] or ''}}" type="text">
                                <button class="btn btn-default"><span class="icon_cloud-upload_alt"></span><font><font class=""> 搜索</font></font></button>
                                <!-- <button class="btn btn-primary" >搜索</button> -->
                                
                            </form>
                        </li>                    
                    </ul>
                    <!--  search form end -->                
                </div>
          </header>
            
            <table class="table table-striped table-advance table-hover">
             <tbody>
                <tr>
                   <th><i class="icon_profile"></i><font><font> 编号</font></font></th>
                   <th><i class="icon_profile"></i><font><font> 品名</font></font></th>
                   <th><i class="icon_calendar"></i><font><font> 规格</font></font></th>
                   <th><i class="icon_mail_alt"></i><font><font> 产地</font></font></th>
                   <th><i class="icon_pin_alt"></i><font><font> 产地价格</font></font></th>
                   <th><i class="icon_mobile"></i><font><font> 市场</font></font></th>
                   <th><i class="icon_cogs"></i><font><font> 市场价格</font></font></th>
                   <th><i class="icon_cogs"></i><font><font> 添加时间</font></font></th>
                   <th><i class="icon_cogs"></i><font><font> 操作</font></font></th>
                    
                </tr>
                @foreach($prices as $k => $v)
                <tr>
                   <td><font><font>{{$v -> id}}</font></font></td>
                   <td><font><font>{{$v -> mName}}</font></font></td>
                   <td><font><font>{{$v -> size}}</font></font></td>
                   <td><font><font>{{$v -> from}}</font></font></td>
                   <td><font><font>{{$v -> marketprice}}</font></font></td>
                   <td><font><font>{{$v -> market}}</font></font></td>
                   <td><font><font>{{$v -> fromprice}}</font></font></td>
                   <td><font><font>{{date('Y-m-d H:i:s',$v->time)}}</font></font></td>

                   <td>
                    <div class="btn-group">
                        <a class="btn btn-primary" href="{{url('/admin/price/add')}}"><i class="icon_plus_alt2"></i></a>
                        <a class="btn btn-success" href="{{url('/admin/price/edit',['id' => $v->id])}}"><i class="icon_check_alt2"></i></a>
                        <a id='del' class="btn btn-danger" href="{{url('/admin/price/delete',['id' => $v -> id])}}"><i class="icon_close_alt2"></i></a>
                    </div>
                    </td>
                </tr>
                @endforeach               
             </tbody>
          </table>
          <div style="text-align: center;">
  
          <!-- {!! $prices->render() !!} -->
              {!! $prices -> appends($data) -> render() !!}
          </div>
        </section>
    </div>
</div>
<script type="text/javascript" src="/bootcss/admin/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
  $(".btn-danger").click(function(){
      res = confirm('确定要删除该条信息?');
      if(!res){
          return false;
      }
  });
</script>


</script>


@endsection